package com.liuda066.forumssm.services;

import com.liuda066.forumssm.model.User;
import org.apache.ibatis.annotations.Param;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/9/1 14:23
 */

public interface IUserService {
    User selectByUsername (@Param("username") String username);

    void createNormalUser(User user);

    User login(String username ,String password);

    User selectById(Long Id);

    void modifyInfo(User user);

    void modifyPassword(Long id,String newPassword,String oldPassword);

    /**
     * 贴子数加1
     * @param id
     * @return
     */
    void addOneArticleCountById(Long id);
    /**
     * 贴子数减1
     * @param id
     * @return
     */
    void subOneArticleCountById(Long id);
}
